import {
	request
} from '@/utils/request.js';

/**
 * 合成活动列表
 * @param {*} data page=1&limit=10
 * @returns 
 */
export const getConflateList = (data) => {
	return request({
		url: '/marketing/conflate/list',
		data: data,
		method: 'GET'
	})
}
/**
 * 合成活动详情
 * @param {*} data id
 * @returns 
 */
export const conflateDetail = (data) => {
	return request({
		url: '/marketing/conflate/detail',
		data: data,
		method: 'GET'
	})
}
/**
 * 获取进度详情
 * @param {*} data id
 * @returns 
 */
export const progressDetail = (data) => {
	return request({
		url: '/marketing/conflate/progressDetail',
		data: data,
		method: 'GET'
	})
}
/**
 * 获取我的材料
 * @param {*} data id
 * @returns 
 */
export const myConflateGoods = (data) => {
	return request({
		url: '/marketing/conflate/myGoods',
		data: data,
		method: 'GET'
	})
}
/**
 * 放入碎片
 * @param {*} data
 *  [
        {"goods_id": 50, "num": 3},
        {"goods_id": 51, "num": 1}
    ]
 * @returns 
 */
export const putInGoods = (data) => {
	return request({
		url: '/marketing/conflate/putIn',
		data: data,
		method: 'POST'
	})
}
/**
 * 移除碎片
 * @param {*} data
 *  [
        {"goods_id": 50, "num": 3},
        {"goods_id": 51, "num": 1}
    ]
 * @returns 
 */
export const removeGoods = (data) => {
    return request({
        url: '/marketing/conflate/remove',
        data: data,
        method: 'POST'
    })
}
/**
 * 去合成
 * @param {*} data
 *  [
        {"goods_id": 50, "num": 3},
        {"goods_id": 51, "num": 1}
    ]
 * @returns 
 */
export const doConflate = (data) => {
    return request({
        url: '/marketing/conflate/do',
        data: data,
        method: 'POST'
    })
}

/**
 * 合成记录
 * @param {*} data page=1&limit=10&status=0
 * @returns 
 */
export const conflateLog = (data) => {
	return request({
		url: '/marketing/conflate/log',
		data: data,
		method: 'GET'
	})
}

